package com.spring.aop;

import com.spring.aop.service.UsersAopService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.TooManyListenersException;

/**
 * @ClassName TestAop
 * @Description TODO:
 * @Author 12994
 * @Date 2024/10/19 12:55
 * @Version 1.0
 **/
public class TestAop {
    public static void main(String[] args) throws TooManyListenersException {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        UsersAopService usersAopService = (UsersAopService) applicationContext.getBean("usersAopService");
        usersAopService.list();
        usersAopService.delete();
//        usersAopService.throwError();
    }
}
